package com.forlgb.powercloud.dubbo.consumer.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import com.forlgb.powercloud.dubbo.api.service.HelloDubboService;

/**
 * @author lyk
 */
@RestController
public class DubboController {

    //远程引用服务，版本号为1.0.0
    @DubboReference(version = "${service.version}")
    private HelloDubboService helloDubboService;

    @GetMapping("/dubbo")
    public String helloDubbo(){
        return helloDubboService.helloDubboService();
    }
}
